<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>日期对象</title>
</head>
<body>
    <script>
        var date=new Date();
        document.write(date);
        document.write(date.getFullYear());
        document.write(date.getDay());
    </script>
</body>
</html>